#!/bin/bash

# 安装自定义节点的依赖
if [ -f "/home/node/.n8n/custom/package.json" ]; then
    echo "Installing custom node dependencies..."
    cd /home/node/.n8n/custom
    npm install --only=production
    cd /
fi

# 启动 n8n
exec tini -- n8n start
